package com.ost.kautilya.utils;


public abstract class StatisticalMetric extends Number {

	private Metric type;

	public Metric getType() {
		return type;
	}

	public void setType(Metric type) {
		this.type = type;
	}

	private static final long serialVersionUID = 1L;

	abstract public void push(long index, Number number);

	abstract public Number value();

	abstract public void reset();

	@Override
	public String toString() {
		return String.valueOf(value().doubleValue());
	}

	@Override
	public double doubleValue() {
		return value().doubleValue();
	}

	@Override
	public float floatValue() {
		return value().floatValue();
	}

	@Override
	public int intValue() {
		return value().intValue();
	}

	@Override
	public long longValue() {
		return value().longValue();
	}

	@Override
	public byte byteValue() {
		return value().byteValue();
	}

	@Override
	public short shortValue() {
		return value().shortValue();
	}

}
